<?php

use Illuminate\Database\Seeder;

class SysRoleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //插入角色
        DB::table('sys_roles')->insert([
            ['role_id' => 1, 'parent_id' => 0, 'name' => 'supper-admin', 'display_name' => '超级管理员', 'description' => '超级系统管理员', 'order_num' => 1, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')],
        ]);
        //给用户分配角色
        DB::table('sys_role_users')->insert([
            ['role_id' => 1, 'user_id' => 1, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')],
            ['role_id' => 1, 'user_id' => 2, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')],
        ]);
    }
}
